﻿CREATE TABLE [dbo].[FlightSeatClassDetail] (
    [FlightId]       INT NOT NULL,
    [SeatClassId]    INT NOT NULL,
    [Max]            INT NOT NULL,
    [AvailableSeats] INT NOT NULL,
    CONSTRAINT [PK_DanhSachHangGhe] PRIMARY KEY CLUSTERED ([FlightId] ASC, [SeatClassId] ASC),
    CONSTRAINT [FK_FlightSeatClassDetail_Flight] FOREIGN KEY ([FlightId]) REFERENCES [dbo].[Flight] ([Id]),
    CONSTRAINT [FK_FlightSeatClassDetail_SeatClass] FOREIGN KEY ([SeatClassId]) REFERENCES [dbo].[SeatClass] ([Id])
);

